<?php
if (defined("E107SHOP")) return;
$scriptDebug = false;
require(e_BASE.'e107_config.php');
$fulldirname = dirname(__FILE__);
$tempdir = str_replace("\\", "/", $fulldirname);
$pos = strpos($tempdir, $PLUGINS_DIRECTORY);
$dirname = substr($fulldirname, $pos);
$lenpd = strlen($PLUGINS_DIRECTORY);
$pos2 = $pos + $lenpd;
$dirresult = substr($fulldirname, $pos2);

if ($scriptDebug) {
    echo "Complete Directory (\$fulldirname): ".$fulldirname;
    echo "<br />";
    echo "Positie (\$pos): ".$pos;
    echo "<br />";
    echo "Lengte van \$PLUGINS_DIRECTORY: ".$lenpd;
    echo "<br />";
    echo "Directory (\$dirname): ".$dirname;
    echo "<br />";
    echo "Directory naam: ".$dirresult;
    define("E107SHOP", $dirresult);
    echo "<br />";
    echo "Standard defined E107SHOP: ".$dirresult;
} else {
    define("E107SHOP", $dirresult);
}
if ($scriptDebug) echo "<br />End of debugging !";
